import request from '@/utils/request'


// 分页获取员工列表
export function getRoleList(params) {
  return request({
    url: '/system/acddRole/list',
    method: 'get',
    params
  })
}


// 新建员工
export function addRole(data) {
  return request({
    url: '/system/acddRole',
    method: 'POST',
    data
  })
}

// 修改员工
export function editRole(data) {
  return request({
    url: '/system/acddRole/edit',
    method: 'post',
    data
  })
}

// 员工查询(查看)
export function getRoleDetail(id) {
  return request({
    url: `/system/acddRole/${id}`,
    method: 'GET'
  })
}


// 删除员工
export function delRole(ids) {
  return request({
    url: `/system/acddRole/remove/${ids}`,
    method: 'post'
  })
}

// 修改状态
export function contrlRole(data) {
  return request({
    url: `/system/acddRole/changeStatus`,
    method: 'post',
    data
  })
}

// 菜单列表
export function getMenuTree() {
  return request({
    url: `/system/acddRole/treeselect`,
    method: 'get'
  })
}